package com.jacky.javafx.graph;

import java.util.Comparator;

public class Edge implements Comparator<Edge> {

    public int source;
    public int destination;
    public int weight;


    public Edge() {
    }

    public Edge(int source, int destination, int weight) {
        this.source = source;
        this.destination = destination;
        this.weight = weight;
    }

    @Override
    public int compare(Edge e1, Edge e2) {
        return (e1.weight - e2.weight);
    }
}
